/*
*Copyright 2021-2023 NERCIS
*
*Licensed under the Apache License, Version 2.0 (the "License");
*you may not use this file except in compliance with the License.
*You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*Unless required by applicable law or agreed to in writing, software
*distributed under the License is distributed on an "AS IS" BASIS,
*WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*See the License for the specific language governing permissions and
*limitations under the License.
*/

package cn.ac.nercis.pes.community.model.vo.asset;

import javafx.beans.property.SimpleStringProperty;
import org.apache.commons.lang3.StringUtils;

/**
 * 密码产品系统资产信息修改视图模型
 * @author zpy
 * @version 1.0.0
 */
public class PwdProductVO extends BaseAssetVO{
    private final SimpleStringProperty name = new SimpleStringProperty();
    private final SimpleStringProperty vendor = new SimpleStringProperty();
    private final SimpleStringProperty model = new SimpleStringProperty();
    private final SimpleStringProperty algorithm = new SimpleStringProperty();
    private final SimpleStringProperty count = new SimpleStringProperty();
    private final SimpleStringProperty use = new SimpleStringProperty();
    private final SimpleStringProperty desc = new SimpleStringProperty();
    private final SimpleStringProperty quoteAssetId = new SimpleStringProperty();

    public String getName() {
        return name.get();
    }

    public SimpleStringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        if(!StringUtils.equals(getName(),name)){
            change = true;
        }
        this.name.set(name);
    }

    public String getVendor() {
        return vendor.get();
    }

    public SimpleStringProperty vendorProperty() {
        return vendor;
    }

    public void setVendor(String vendor) {
        if(!StringUtils.equals(getVendor(),vendor)){
            change = true;
        }
        this.vendor.set(vendor);
    }

    public String getModel() {
        return model.get();
    }

    public SimpleStringProperty modelProperty() {
        return model;
    }

    public void setModel(String model) {
        if(!StringUtils.equals(getModel(),model)){
            change = true;
        }
        this.model.set(model);
    }

    public String getAlgorithm() {
        return algorithm.get();
    }

    public SimpleStringProperty algorithmProperty() {
        return algorithm;
    }

    public void setAlgorithm(String algorithm) {
        if(!StringUtils.equals(getAlgorithm(),algorithm)){
            change = true;
        }
        this.algorithm.set(algorithm);
    }

    public String getCount() {
        return count.get();
    }

    public SimpleStringProperty countProperty() {
        return count;
    }

    public void setCount(String count) {
        if(!StringUtils.equals(getCount(),count)){
            change = true;
        }
        this.count.set(count);
    }

    public String getUse() {
        return use.get();
    }

    public SimpleStringProperty useProperty() {
        return use;
    }

    public void setUse(String use) {
        if(!StringUtils.equals(getUse(),use)){
            change = true;
        }
        this.use.set(use);
    }

    public String getDesc() {
        return desc.get();
    }

    public SimpleStringProperty descProperty() {
        return desc;
    }

    public void setDesc(String desc) {
        if(!StringUtils.equals(getDesc(),desc)){
            change = true;
        }
        this.desc.set(desc);
    }

    public String getQuoteAssetId() {
        return quoteAssetId.get();
    }

    public SimpleStringProperty quoteAssetIdProperty() {
        return quoteAssetId;
    }

    public void setQuoteAssetId(String quoteAssetId) {
        this.quoteAssetId.set(quoteAssetId);
    }
}